package com.springboot.annotation;

import com.springboot.annotation.conditional.module.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Map;

/**
 * @author Administrator
 * 注解模块
 */
@SpringBootApplication
public class AnnotationApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(AnnotationApplication.class, args);
        System.out.println("当前系统："+run.getEnvironment().getProperty("os.name"));
        Map<String, Person> map = run.getBeansOfType(Person.class);
        System.out.println(map);
    }

}
